package listTest;

import java.util.LinkedList;

/**
 * @Author Zhang Chao
 * @Date 2021/5/17 9:32
 * @Version 1.0
 */

public class QueueLTest {
    public static void main(String[] args){
        QueueL queueL = new QueueL();
        for (int i = 0; i < 10 ; i++) {
            queueL.put(Integer.toString(i));
        }

        while(!queueL.isEmpty()){
            System.out.println(queueL.get());
        }
    }
}
class QueueL{
    private LinkedList list = new LinkedList();
    public void put(Object v){
        list.addFirst(v);
    }
    public Object get() {
        return list.removeLast();
    }
    public boolean isEmpty() {
        return list.isEmpty();
    }

}
